-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use openedxcommerce instead of openedx_commerce as a prefix
- Loading branch information
Showing
19 changed files
with
149 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,15 @@ | |
* | ||
* @category Admin | ||
* @package WordPress | ||
* @subpackage Openedx_Commerce | ||
* @subpackage OpenedxCommerce | ||
* @since 1.0.0 | ||
*/ | ||
|
||
namespace OpenedXCommerce\admin; | ||
|
||
use OpenedXCommerce\model\Openedx_Commerce_Enrollment; | ||
use OpenedXCommerce\model\Openedx_Commerce_Post_Type; | ||
use OpenedXCommerce\admin\views\Openedx_Commerce_Enrollment_Info_Form; | ||
use OpenedXCommerce\model\OpenedxCommerce_Enrollment; | ||
use OpenedXCommerce\model\OpenedxCommerce_Post_Type; | ||
use OpenedXCommerce\admin\views\OpenedxCommerce_Enrollment_Info_Form; | ||
use OpenedXCommerce\utils; | ||
|
||
|
||
|
@@ -23,8 +23,8 @@ | |
* @link https://edunext.co/ | ||
* @since 1.0.0 | ||
* | ||
* @package Openedx_Commerce | ||
* @subpackage Openedx_Commerce/admin | ||
* @package OpenedxCommerce | ||
* @subpackage OpenedxCommerce/admin | ||
*/ | ||
|
||
/** | ||
|
@@ -33,11 +33,11 @@ | |
* Defines the plugin name, version, and two examples hooks for how to | ||
* enqueue the admin-specific stylesheet and JavaScript. | ||
* | ||
* @package Openedx_Commerce | ||
* @subpackage Openedx_Commerce/admin | ||
* @package OpenedxCommerce | ||
* @subpackage OpenedxCommerce/admin | ||
* @author eduNEXT <[email protected]> | ||
*/ | ||
class Openedx_Commerce_Admin { | ||
class OpenedxCommerce_Admin { | ||
|
||
/** | ||
* The ID of this plugin. | ||
|
@@ -85,14 +85,14 @@ public function __construct( $plugin_name, $version, $test = null ) { | |
} | ||
|
||
/** | ||
* Create an instance of the Openedx_Commerce_Enrollment class. | ||
* Create an instance of the OpenedxCommerce_Enrollment class. | ||
* | ||
* @since 1.0.0 | ||
* | ||
* @return void | ||
*/ | ||
public function create_enrollment_class() { | ||
$this->openedx_enrollment = new Openedx_Commerce_Enrollment( $this ); | ||
$this->openedx_enrollment = new OpenedxCommerce_Enrollment( $this ); | ||
} | ||
|
||
/** | ||
|
@@ -106,10 +106,10 @@ public function enqueue_styles() { | |
* This function is provided for demonstration purposes only. | ||
* | ||
* An instance of this class should be passed to the run() function | ||
* defined in Openedx_Commerce_Loader as all of the hooks are defined | ||
* defined in OpenedxCommerce_Loader as all of the hooks are defined | ||
* in that particular class. | ||
* | ||
* The Openedx_Commerce_Loader will then create the relationship | ||
* The OpenedxCommerce_Loader will then create the relationship | ||
* between the defined hooks and the functions defined in this | ||
* class. | ||
*/ | ||
|
@@ -128,10 +128,10 @@ public function enqueue_scripts() { | |
* This function is provided for demonstration purposes only. | ||
* | ||
* An instance of this class should be passed to the run() function | ||
* defined in Openedx_Commerce_Loader as | ||
* defined in OpenedxCommerce_Loader as | ||
* all of the hooks are defined in that particular class. | ||
* | ||
* The Openedx_Commerce_Loader will then create the relationship | ||
* The OpenedxCommerce_Loader will then create the relationship | ||
* between the defined hooks and the functions defined in this | ||
* class. | ||
*/ | ||
|
@@ -153,7 +153,7 @@ public function register_enrollment_custom_post_type() { | |
* @since 1.0.0 | ||
*/ | ||
public function render_enrollment_info_form( $post ) { | ||
$this->openedx_enrollment_info_form = new Openedx_Commerce_Enrollment_Info_Form( $post ); | ||
$this->openedx_enrollment_info_form = new OpenedxCommerce_Enrollment_Info_Form( $post ); | ||
} | ||
|
||
/** | ||
|
@@ -179,7 +179,7 @@ public function register_post_type( $post_type = '', $plural = '', $single = '', | |
} | ||
|
||
/** | ||
* Create a new instance of the Openedx_Commerce_Post_Type class and register a new post type. | ||
* Create a new instance of the OpenedxCommerce_Post_Type class and register a new post type. | ||
* | ||
* @param string $post_type Post type name. | ||
* @param string $plural Post type item plural name. | ||
|
@@ -195,7 +195,7 @@ public function create_post_type( | |
$description = '', | ||
array $options | ||
) { | ||
return new Openedx_Commerce_Post_Type( $post_type, $plural, $single, $description, $options ); | ||
return new OpenedxCommerce_Post_Type( $post_type, $plural, $single, $description, $options ); | ||
} | ||
|
||
/** | ||
|
@@ -232,8 +232,8 @@ public function add_openedx_course_product_type( $type_options ) { | |
* @return void | ||
*/ | ||
public function save_openedx_option( $post_id ) { | ||
if ( ! isset( $_POST['openedx_commerce_custom_product_nonce'] ) || | ||
! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['openedx_commerce_custom_product_nonce'] ) ), 'openedx_commerce_custom_product_nonce' ) | ||
if ( ! isset( $_POST['openedxcommerce_custom_product_nonce'] ) || | ||
! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['openedxcommerce_custom_product_nonce'] ) ), 'openedxcommerce_custom_product_nonce' ) | ||
) { | ||
return; | ||
} | ||
|
@@ -250,11 +250,11 @@ public function add_custom_product_fields() { | |
|
||
global $post; | ||
|
||
$nonce = wp_create_nonce( 'openedx_commerce_custom_product_nonce' ); | ||
$nonce = wp_create_nonce( 'openedxcommerce_custom_product_nonce' ); | ||
|
||
echo '<div class="custom_options_group">'; | ||
|
||
echo '<input type="hidden" name="openedx_commerce_custom_product_nonce" value="' . esc_attr( $nonce ) . '">'; | ||
echo '<input type="hidden" name="openedxcommerce_custom_product_nonce" value="' . esc_attr( $nonce ) . '">'; | ||
|
||
woocommerce_wp_text_input( | ||
array( | ||
|
@@ -313,7 +313,7 @@ public function add_admin_order_item_values( $product, $item, $item_id = null ) | |
|
||
// Check if the product has a non-empty "_course_id" metadata. | ||
$course_id = ''; | ||
$nonce = wp_create_nonce( 'openedx_commerce_order_item_nonce' ); | ||
$nonce = wp_create_nonce( 'openedxcommerce_order_item_nonce' ); | ||
|
||
if ( $product ) { | ||
$course_id = get_post_meta( $product->get_id(), '_course_id', true ); | ||
|
@@ -327,7 +327,7 @@ public function add_admin_order_item_values( $product, $item, $item_id = null ) | |
$order_url = esc_url( admin_url( 'post.php?post=' . intval( $input_value ) . '&action=edit' ) ); | ||
|
||
$html_output = '<td>'; | ||
$html_output .= '<input type="hidden" name="openedx_commerce_order_item_nonce" value="' . esc_attr( $nonce ) . '">'; | ||
$html_output .= '<input type="hidden" name="openedxcommerce_order_item_nonce" value="' . esc_attr( $nonce ) . '">'; | ||
$html_output .= '<input style="height:30px;" type="text" name="openedx_order_id_input' . esc_attr( $item_id ) . '" value="' . esc_attr( $input_value ) . '" pattern="\d*" />'; | ||
$html_output .= '<a href="' . $order_url . '" class="button" style="margin-left: 5px; vertical-align: bottom;' . ( $input_value ? '' : 'pointer-events: none; opacity: 0.6;' ) . '">View Request</a>'; | ||
$html_output .= '</td>'; | ||
|
@@ -376,8 +376,8 @@ public function save_order_meta_data( $order_id ) { | |
|
||
$items = wc_get_order( $order_id )->get_items(); | ||
|
||
if ( ! isset( $_POST['openedx_commerce_order_item_nonce'] ) || | ||
! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['openedx_commerce_order_item_nonce'] ) ), 'openedx_commerce_order_item_nonce' ) | ||
if ( ! isset( $_POST['openedxcommerce_order_item_nonce'] ) || | ||
! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['openedxcommerce_order_item_nonce'] ) ), 'openedxcommerce_order_item_nonce' ) | ||
) { | ||
return; | ||
} | ||
|
@@ -398,8 +398,8 @@ public function save_order_meta_data( $order_id ) { | |
* @since 1.1.1 | ||
*/ | ||
public function save_custom_product_fields( $post_id ) { | ||
if ( ! isset( $_POST['openedx_commerce_custom_product_nonce'] ) || | ||
! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['openedx_commerce_custom_product_nonce'] ) ), 'openedx_commerce_custom_product_nonce' ) | ||
if ( ! isset( $_POST['openedxcommerce_custom_product_nonce'] ) || | ||
! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['openedxcommerce_custom_product_nonce'] ) ), 'openedxcommerce_custom_product_nonce' ) | ||
) { | ||
return; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ | |
* @link https://edunext.co/ | ||
* @since 1.0.0 | ||
* | ||
* @package Openedx_Commerce | ||
* @subpackage Openedx_Commerce/includes | ||
* @package OpenedxCommerce | ||
* @subpackage OpenedxCommerce/includes | ||
*/ | ||
|
||
namespace OpenedXCommerce; | ||
|
@@ -17,11 +17,11 @@ | |
* This class defines all code necessary to run during the plugin's activation. | ||
* | ||
* @since 1.0.0 | ||
* @package Openedx_Commerce | ||
* @subpackage Openedx_Commerce/includes | ||
* @package OpenedxCommerce | ||
* @subpackage OpenedxCommerce/includes | ||
* @author eduNEXT <[email protected]> | ||
*/ | ||
class Openedx_Commerce_Activator { | ||
class OpenedxCommerce_Activator { | ||
|
||
/** | ||
* Short Description. (use period) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ | |
* @link https://edunext.co/ | ||
* @since 1.0.0 | ||
* | ||
* @package Openedx_Commerce | ||
* @subpackage Openedx_Commerce/includes | ||
* @package OpenedxCommerce | ||
* @subpackage OpenedxCommerce/includes | ||
*/ | ||
|
||
namespace OpenedXCommerce; | ||
|
@@ -17,11 +17,11 @@ | |
* This class defines all code necessary to run during the plugin's deactivation. | ||
* | ||
* @since 1.0.0 | ||
* @package Openedx_Commerce | ||
* @subpackage Openedx_Commerce/includes | ||
* @package OpenedxCommerce | ||
* @subpackage OpenedxCommerce/includes | ||
* @author eduNEXT <[email protected]> | ||
*/ | ||
class Openedx_Commerce_Deactivator { | ||
class OpenedxCommerce_Deactivator { | ||
|
||
/** | ||
* Short Description. (use period) | ||
|
Oops, something went wrong.