This file contains hidden or 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
<?php | |
add_filter( "wpdmpp_as_you_pay_label", function ( $str, $product_id ) { | |
$str = "Your custom text"; | |
return $str; | |
}, 10, 2 ); |
This file contains hidden or 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
<?php | |
add_filter("get_terms", function ($terms, $tax, $ta, $tz){ | |
$_terms = []; | |
if($tax[0] === 'wpdmcategory') { | |
foreach ($terms as $term) { | |
if(WPDM()->categories::userHasAccess($term->term_id)) { | |
$_terms[] = $term; | |
} | |
} | |
} |
This file contains hidden or 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
<?php | |
add_filter("wpdm_disable_scripts", function ($disabled_scripts) { | |
// $disabled_scripts = ['wpdm-bootstrap-js', 'wpdm-bootstrap-css', 'wpdm-font-awesome', 'wpdm-front']; | |
// by default $disabled_scripts = [], means all scripts are enabled, | |
// if you want to disable 'wpdm-bootstrap-css' push it to $disabled_scripts, like $disabled_scripts[] = 'wpdm-bootstrap-css'; | |
// example to disable scripts on page id 123 | |
if(get_the_ID() === 123) { | |
$disabled_scripts[] = 'wpdm-bootstrap-css'; | |
$disabled_scripts[] = 'wpdm-bootstrap-js'; | |
} |
OlderNewer